/* $Id: JMapPropertiesDialogUnitTest.java 63 2010-02-14 13:52:34Z aaron.day $ */
package org.crazydays.gameplan.map.swing;


import org.junit.*;
import static org.junit.Assert.*;

import static org.easymock.EasyMock.*;
import static org.easymock.classextension.EasyMock.*;

import org.crazydays.gameplan.map.GameMap;
import org.crazydays.gameplan.view.View;

/**
 * JMapPropertiesDialogUnitTest
 */
public class JMapPropertiesDialogUnitTest
{
    /**
     * Test constructor.
     */
    @Test
    public void testConstructor()
    {
        // objects
        GameMap gameMap = new GameMap("name");

        // mock
        View view = createMock(View.class);

        // expect
        expect(view.getParent()).andReturn(null);

        // replay
        replay(view);

        // test
        JMapPropertiesDialog dialog = new JMapPropertiesDialog(view, gameMap);

        // verify
        verify(view);

        assertNotNull("dialog", dialog);
        assertEquals("dialog.gameMap", gameMap, dialog.gameMap);
        assertEquals("dialog.title", "name", dialog.getTitle());
    }
}
